package com.mrd.gtimpframe.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

public class GenProtocol implements Serializable {
	/**
	 * 草稿
	 */
	public static String CRAFT = "0";
	/**
	 * 生效
	 */
	public static String EFFECTIVE = "1";
	/**
	 * 待生效
	 */
	public static String WAIT_EFFECTIVE = "2";
	/**
	 * 结束
	 */
	public static String INVALID = "3";
	/**
	 * 被驳回
	 */
	public static String REJECTED = "4";

	private String				id;

	private String				uniteId;

	private String				supplierId;

	private String				supplierName;

	private String				name;

	private Date				effectTimeStart;

	private Date				effectTimeEnd;

	private String				descript;

	private String				status;

	private String				creator;

	private Date				createTime;

	private String				modifier;

	private Date				modifyTime;

	private List<GenProtocolProp> props;
	private List<GenProtocolFee> fees;

	private static final long	serialVersionUID	= 1L;

	public GenProtocol(String id, String uniteId, String supplierId, String name, Date effectTimeStart,
	        Date effectTimeEnd, String status, String creator, Date createTime, String modifier,
	        Date modifyTime, String descript) {
		this.id = id;
		this.uniteId = uniteId;
		this.supplierId = supplierId;
		this.name = name;
		this.effectTimeStart = effectTimeStart;
		this.effectTimeEnd = effectTimeEnd;
		this.status = status;
		this.creator = creator;
		this.createTime = createTime;
		this.modifier = modifier;
		this.modifyTime = modifyTime;
		this.descript = descript;
	}

	public GenProtocol(String id, String uniteId, String supplierId, String name, Date effectTimeStart,
			Date effectTimeEnd, String status, String creator, Date createTime, String modifier,
			Date modifyTime, String descript, String supplierName) {
		this.id = id;
		this.uniteId = uniteId;
		this.supplierId = supplierId;
		this.name = name;
		this.effectTimeStart = effectTimeStart;
		this.effectTimeEnd = effectTimeEnd;
		this.status = status;
		this.creator = creator;
		this.createTime = createTime;
		this.modifier = modifier;
		this.modifyTime = modifyTime;
		this.descript = descript;
		this.supplierName = supplierName;
	}

	public GenProtocol() {
		super();
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id == null ? null : id.trim();
	}

	public String getSupplierId() {
		return supplierId;
	}

	public void setSupplierId(String supplierId) {
		this.supplierId = supplierId == null ? null : supplierId.trim();
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name == null ? null : name.trim();
	}

	public Date getEffectTimeStart() {
		return effectTimeStart;
	}

	public void setEffectTimeStart(Date effectTimeStart) {
		this.effectTimeStart = effectTimeStart;
	}

	public Date getEffectTimeEnd() {
		return effectTimeEnd;
	}

	public void setEffectTimeEnd(Date effectTimeEnd) {
		this.effectTimeEnd = effectTimeEnd;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status == null ? null : status.trim();
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator == null ? null : creator.trim();
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getModifier() {
		return modifier;
	}

	public void setModifier(String modifier) {
		this.modifier = modifier == null ? null : modifier.trim();
	}

	public Date getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}

	public String getDescript() {
		return descript;
	}

	public void setDescript(String descript) {
		this.descript = descript;
	}

	public String getUniteId() {
		return uniteId;
	}

	public void setUniteId(String uniteId) {
		this.uniteId = uniteId;
	}

	@Override
	public boolean equals(Object o) {
		if(this == o)
			return true;
		if(o == null || getClass() != o.getClass())
			return false;

		GenProtocol that = (GenProtocol) o;

		if(id != null ? !id.equals(that.id) : that.id != null)
			return false;
		if(supplierId != null ? !supplierId.equals(that.supplierId) : that.supplierId != null)
			return false;
		if(name != null ? !name.equals(that.name) : that.name != null)
			return false;
		if(effectTimeStart != null ? !effectTimeStart.equals(that.effectTimeStart)
		        : that.effectTimeStart != null)
			return false;
		if(effectTimeEnd != null ? !effectTimeEnd.equals(that.effectTimeEnd)
		        : that.effectTimeEnd != null)
			return false;
		if(descript != null ? !descript.equals(that.descript) : that.descript != null)
			return false;
		if(status != null ? !status.equals(that.status) : that.status != null)
			return false;
		if(creator != null ? !creator.equals(that.creator) : that.creator != null)
			return false;
		if(createTime != null ? !createTime.equals(that.createTime) : that.createTime != null)
			return false;
		if(modifier != null ? !modifier.equals(that.modifier) : that.modifier != null)
			return false;
		return modifyTime != null ? modifyTime.equals(that.modifyTime) : that.modifyTime == null;
	}

	@Override
	public int hashCode() {
		int result = id != null ? id.hashCode() : 0;
		result = 31 * result + (supplierId != null ? supplierId.hashCode() : 0);
		result = 31 * result + (name != null ? name.hashCode() : 0);
		result = 31 * result + (effectTimeStart != null ? effectTimeStart.hashCode() : 0);
		result = 31 * result + (effectTimeEnd != null ? effectTimeEnd.hashCode() : 0);
		result = 31 * result + (descript != null ? descript.hashCode() : 0);
		result = 31 * result + (status != null ? status.hashCode() : 0);
		result = 31 * result + (creator != null ? creator.hashCode() : 0);
		result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
		result = 31 * result + (modifier != null ? modifier.hashCode() : 0);
		result = 31 * result + (modifyTime != null ? modifyTime.hashCode() : 0);
		return result;
	}

	@Override
	public String toString() {
		return "GenProtocol{" + "id='" + id + '\'' + ", supplierId='" + supplierId + '\''
		        + ", name='" + name + '\'' + ", effectTimeStart=" + effectTimeStart
		        + ", effectTimeEnd=" + effectTimeEnd + ", descript='" + descript + '\''
		        + ", status='" + status + '\'' + ", creator='" + creator + '\'' + ", createTime="
		        + createTime + ", modifier='" + modifier + '\'' + ", modifyTime=" + modifyTime
		        + '}';
	}

	public List<GenProtocolProp> getProps() {
		return props;
	}

	public void setProps(List<GenProtocolProp> props) {
		this.props = props;
	}

	public List<GenProtocolFee> getFees() {
		return fees;
	}

	public void setFees(List<GenProtocolFee> fees) {
		this.fees = fees;
	}

	public String getSupplierName() {
		return supplierName;
	}

	public void setSupplierName(String supplierName) {
		this.supplierName = supplierName;
	}
}
